import React, { Suspense  } from 'react'
import { BrowserRouter } from 'react-router-dom'
import renderRoutes from '@/routes/renderRoutes'
import routes from '@/routes/index'

const App = () => (
  <BrowserRouter>
    <Suspense fallback={<div>Loading...</div>}>
       { renderRoutes(routes) }
     </Suspense>
  </BrowserRouter>
 )

export default App
